package com.ksd.common.config;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import java.util.function.Consumer;

//定义异步工具类，用于执行异步任务
@Component
public class AsyncUtils {

    @Async("newAsyncExecutor")
    public void exec(Object param, Consumer consumer) {
        consumer.accept(param);
    }
}

